home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1989 / Dec 89 / 0261-Re Com Init Help Nee-Dec89 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.3 KB  |  37 lines  |  [TEXT/GEOL]

  1. Item    2855763                         22-Dec-89        14:09
  2.  
  3. From:   KNEPPER                         Knepper, Christopher
  4.  
  5. To:     AM0086                          Charles Schwab, Margaret Taylor,AM
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Re: Com Init Help Needed
  10.  
  11. Michael,
  12.  
  13. I would recommend the following steps (and in the following order!!!) for
  14. initializing the serial driver:
  15.  
  16. 1. open the output and input drivers (eg RAMSDOpen(sPortA))
  17. 3. call SerReset on the output driver (eg ref num = -7) with the baud, stop
  18. bits, parity, data bits
  19. 4. call SerHShake on the output driver (eg ref num = -7) with fXon =1, fCTS =1,
  20. fInx =1, xOn = Chr(17), xOff =Chr(19), errs =0, evts =0
  21. 5. call SerReset on the input driver (eg ref num = -6) with the baud,stop
  22. bits,parity,data bits
  23. 6. call SerHShake on the input driver (eg ref num = -6) with fXon =1, fCTS =1,
  24. fInx =1, xOn = Chr(17), xOff =Chr(19)
  25. 7. call SerSetBuf on the input driver (eg ref num = -6) with a valid pointer
  26. allocated with NewPtr (I suggest 2K minimum)
  27.  
  28. Of course, check for errors at each step and only proceed if err = NoErr.
  29.  
  30. For compatibility with older systems, you should follow the note in Inside Mac
  31. IV-225 re including the 'SERD' resource that is supplied with MPW (in
  32. Libraries:Libraries:) with your application and using RAMSDOpen instead of
  33. OpenDriver.
  34.  
  35. -Chris
  36.  
  37.